package cn.lena.idle.pojo;

import java.io.Serializable;
import java.util.Arrays;
import java.util.UUID;

/**
 * @author lena
 * @date 2021/6/10
 */
public class User implements Serializable {

    private Integer id;   //自增id
    private String uuid;    //学号
    private String username;    //学生姓名
    private String password;    //密码
    private byte[] head;    //头像
    private String phone;   //联系电话
    private String address;  //居住地

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", uuid='" + uuid + '\'' +
                ", username='" + username + '\'' +
                ", head=" + Arrays.toString(head) +
                ", phone='" + phone + '\'' +
                ", address='" + address + '\'' +
                '}';
    }

    public User(String uuid, String username, String password){
        this.uuid=uuid;
        this.username=username;
        this.password=password;
    }

    public User(Integer id,String uuid,String username,String phone,String address){
        this.id=id;
        this.uuid=uuid;
        this.username=username;
        this.phone=phone;
        this.address=address;
    }

    public User(String uuid,String username,String password,String phone,String address){
        this.uuid=uuid;
        this.username=username;
        this.password=password;
        this.phone=phone;
        this.address=address;
    }


    public User(String uuid,String username,String password,byte[] head,String phone,String address){
        this.uuid=uuid;
        this.username=username;
        this.password=password;
        this.head=head;
        this.phone=phone;
        this.address=address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public byte[] getHead() {
        return head;
    }

    public void setHead(byte[] head) {
        this.head = head;
    }

    public User() {
        uuid = UUID.randomUUID().toString();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
